package com.sqx.modules.banArea.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sqx.common.entity.WMPoint;
import com.sqx.modules.utils.typeHandler.DataWMPointTypeHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author wuChang
 * @since 2023-08-28
 */
@Getter
@Setter
@TableName(value = "ban_area", autoResultMap = true)
@ApiModel(value = "BanArea对象", description = "屏蔽区域表")
public class BanArea implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("区域id")
    @TableId(value = "area_id", type = IdType.AUTO)
    private Long areaId;

    @ApiModelProperty("禁止的区域坐标点")
    @TableField(typeHandler = DataWMPointTypeHandler.class)
    private List<WMPoint> points;

    @ApiModelProperty("是否启用 0否 1是")
    private Integer isEnable;

    @ApiModelProperty("备注")
    @TableField(condition = SqlCondition.LIKE)
    private String remarks;


    @ApiModelProperty("省")
    private String province;

    @ApiModelProperty("市")
    private String city;

    @ApiModelProperty("区/县")
    private String district;

    @ApiModelProperty("城市id")
    private Long cityId;


   @ApiModelProperty("上级id")
    private Long parentId;

   @ApiModelProperty("一口价格")
    private BigDecimal baseMoney;


    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @ApiModelProperty("城市名称")
    private String cityName;

    @TableField(exist = false)
    private List<BanArea> childrenList;
}
